package com.qifan.alb2b.action.front;


import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.qifan.alb2b.service.CountryInfoService;
import com.qifan.alb2b.service.cache.AppCache;

@Controller
@RequestMapping("/country")
public class CountryController {
	private CountryInfoService countryInfoService;

	public void setCountryInfoService(CountryInfoService countryInfoService) {
		this.countryInfoService = countryInfoService;
	}

	/**
	 * 在缓存中查询所有已开通的国家
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/queryAll.usr ")
	public String queryAllCountry(HttpServletRequest request){
		request.setAttribute("countrys",AppCache.openCountryInfoList);
		return "pages/front/inc/left_country";
	}
	
	/**
	 * 在缓存中查询所有已开通的国家
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/queryAllCountry.usr ")
	public String queryCountry(HttpServletRequest request){
		request.setAttribute("countrys",AppCache.openCountryInfoList);
		return "pages/front/inc/left_country_only";
	}

}
